<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1,.box2,.box3{
        padding: 50px;
      }
      .box1{
        background-color: #c62e2e;
      }
      .box2{
        background-color: #2e2ec6;
      }
      .box3{
        background-color: #aa33dc;
      }
    </style>
  </head>
  <body>
    <div id="app">
       <div class="box1" @click="fn1(1)">
        <div class="box2" @click="fn2(2)">
          <div class="box3" @click="fn3(3, $event)"></div>
        </div>
       </div>
       <a href="http://www.baidu.com" @click="clickLink">百度</a>
    </div>
    <script src="./vue.global.js"></script>
    <script>
      
      const { createApp } = Vue;
      const app = createApp({
        data() {
          return {
          
            
          };
        },
        methods: {
          fn1(n){
            console.log(n);
          },
          fn2(n){
            console.log(n);
          },
          fn3(n, e){
            console.log(n);
            e.stopPropagation();
            
            
          },
          clickLink(e){
            e.preventDefault();
            
          }
        }
      });
      app.mount("#app");
    </script>
  </body>
</html>
